import 'package:json_annotation/json_annotation.dart';

part 'category_model.g.dart';


@JsonSerializable()
class CategoryModel extends Object {

  List<Category_tree>? category_tree;

  int errcode;

  String message;

  CategoryModel(this.category_tree,this.errcode,this.message,);

  factory CategoryModel.fromJson(Map<String, dynamic> srcJson) => _$CategoryModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$CategoryModelToJson(this);

}


@JsonSerializable()
class Category_tree extends Object {

  int category_id;

  String category_name;

  int parent_id;

  String category_pic;

  List<Category_tree>? children;



  Category_tree(this.category_id,this.category_name,this.parent_id,this.category_pic,this.children,);

  factory Category_tree.fromJson(Map<String, dynamic> srcJson) => _$Category_treeFromJson(srcJson);

  Map<String, dynamic> toJson() => _$Category_treeToJson(this);

}






